


local mt = ac.skill['离子外壳']
function mt:on_cooldown()
    local hero = self.owner
    self:gc(hero:add_buff '离子外壳'{
        skill = self,
        time = 10,
    })
    self:cooling()
end

local buff = ac.buff['离子外壳']
buff.targetArt = [[war3mapImported\NewSoulArmor.mdx]]
buff.pulse = 0.25
buff.keep = true

function buff:on_add()
    local hero = self.owner
    local skill = self.skill
    local damage = hero:get('生命') * skill.data1/100
    self:gc(hero:add_effect(self.targetArt,'chest'))
    self:gc(hero:add_buff '护盾'{
        shield = damage,
        on_finish = function()
            hero:aoe_damage(hero,600,damage,skill)
        end
    })
end





local mt = ac.skill['奔腾']

function mt:on_add()
    local hero = self.owner
    self:gc(hero:add('智力成长',self.data1))
    self:gc(hero:add_buff '奔腾'{data1 = self.data1})
end


local buff = ac.buff['奔腾']
buff.keep = true
buff.targetArt = [[effects\\Surge.mdx]]

function buff:on_add()
    local hero = self.owner
    hero:add_effect(self.targetArt):remove()
    japi.EXSetUnitMoveType(hero.handle, 16)
    self:gc(hero:event '英雄-复活'(function()
        japi.EXSetUnitMoveType(hero.handle, 16)
    end))
    self:gc(hero:add('移动速度%',self.data1))
    self:gc(function()
        japi.EXSetUnitMoveType(hero.handle, 2)
    end)
end

